package com.yunxi.service.dubboService.impl.sto;

import com.yunxi.sto.service.ReportPartnerMonthDubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import java.lang.reflect.InvocationTargetException;
import com.yunxi.sto.pojo.ReportPartnerMonthVO;
import java.util.Map;
import java.util.List;
import org.springframework.beans.BeanUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yunxi.service.localService.sto.ReportPartnerMonthService;
import com.yunxi.model.sto.ReportPartnerMonth;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Guan
 * @since 2020-03-11
 */
public class ReportPartnerMonthDubboServiceImpl implements ReportPartnerMonthDubboService {

    @Autowired
    @Qualifier(value = "reportPartnerMonthServiceImpl")
    ReportPartnerMonthService reportPartnerMonthService;


    @Override
    public ReportPartnerMonthVO getById(String id) throws InvocationTargetException, IllegalAccessException {
        ReportPartnerMonth reportPartnerMonth = reportPartnerMonthService.getById(id);
        ReportPartnerMonthVO reportPartnerMonthVO = new ReportPartnerMonthVO();
        BeanUtils.copyProperties(reportPartnerMonth,reportPartnerMonthVO);
        return reportPartnerMonthVO;
    }

    @Override
    public void saveOrUpdate(ReportPartnerMonthVO reportPartnerMonthVO) throws InvocationTargetException, IllegalAccessException {
        ReportPartnerMonth reportPartnerMonth = new ReportPartnerMonth();
        BeanUtils.copyProperties(reportPartnerMonthVO,reportPartnerMonth);
        reportPartnerMonthService.saveOrUpdate(reportPartnerMonth);
    }

    @Override
    public void removeById(String id) {
        reportPartnerMonthService.removeById(id);
    }

    @Override
    public PageInfo<ReportPartnerMonthVO> findPageByVO(ReportPartnerMonthVO reportPartnerMonthVO, Integer pageNum, Integer pageSize) throws InvocationTargetException, IllegalAccessException {
        PageInfo<ReportPartnerMonthVO> pageInfo = reportPartnerMonthService.pageByVo(reportPartnerMonthVO,pageNum,pageSize);
        return pageInfo;
    }

    @Override
    public void removeByListVo(List<ReportPartnerMonthVO> reportPartnerMonthVOList) throws IllegalAccessException, InvocationTargetException, InstantiationException {
        reportPartnerMonthService.removeByListVo(reportPartnerMonthVOList);
    }

    @Override
    public List listByVo(ReportPartnerMonthVO reportPartnerMonthVO) {
        return reportPartnerMonthService.listByVo(reportPartnerMonthVO);
    }
}
